package com.gcsoftware.web.beans.elasticsearchData;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.io.Serializable;

/**
 *  ES 返回实体类
 *  @author czp
 *  date : 2018-03-31
 */
@JsonInclude(JsonInclude.Include.NON_NULL)
public class Shards implements Serializable {
    @JsonProperty("total")
    private int total;

    @JsonProperty("successful")
    private int successful;

    @JsonProperty("skipped")
    private int skipped;

    @JsonProperty("failed")
    private int failed;

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("total", total)
                .append("successful", successful)
                .append("skipped", skipped)
                .append("failed", failed)
                .toString();
    }

    public int getTotal() {
        return total;
    }

    public void setTotal(int total) {
        this.total = total;
    }

    public int getSuccessful() {
        return successful;
    }

    public void setSuccessful(int successful) {
        this.successful = successful;
    }

    public int getSkipped() {
        return skipped;
    }

    public void setSkipped(int skipped) {
        this.skipped = skipped;
    }

    public int getFailed() {
        return failed;
    }

    public void setFailed(int failed) {
        this.failed = failed;
    }
}
